home *** CD-ROM | disk | FTP | other *** search
-
- #include <ezylib.h>
- #include <dos.h>
-
- int CompareDosUnixDate(long PackedDosDate,unsigned long UnixDate)
- {
- word Year, Month, Day, Hour, Min, Sec;
- Long2Date(PackedDosDate,Year,Month,Day,Hour,Min,Sec);
- date d;
- time t;
- d.da_year = Year;
- d.da_mon = Month;
- d.da_day = Day;
- t.ti_hour = Hour;
- t.ti_min = Min;
- t.ti_sec = Sec;
- t.ti_hund = 0;
- unsigned long DosUnixDate = dostounix(&d,&t);
- int RetVal;
- if (DosUnixDate < UnixDate)
- RetVal = -1;
- else if (DosUnixDate == UnixDate)
- RetVal = 0;
- else
- RetVal = 1;
- return(RetVal);
- }
-